const express = require('express');
const adminController = require('../controllers/admin.js');
const router = express.Router();

const userController = require('../controllers/user.js');
// 图片列表控制器
const imgController = require('../controllers/imgList.js');
const chapterController = require('../controllers/chapter.js')
// 获取首页
router.get('/', function (req, res, next) {
    res.send('Hello World!')
})
// 获取用户信息
router.get('/get_user',userController.showUser);
router.post('/add_user',userController.addUser)
router.post('/delete_user',userController.deleteUser)


// 登录-注册
router.post('/login', adminController.searchUser);
// 获取图片列表
router.get('/imglist',imgController.showUser);



// 小说分页
router.get('/chapter',chapterController.showChapter);

module.exports = router;